package com.kaolafm.kradio.k_navi_map.location.bean;

import com.amap.api.location.AMapLocation;

/**
 * Created by kaolafm on 2018/4/15.
 */

public class MapLocationData  {
    private double longitude;
    private double latitude;
    private float bearing;
    private String address;

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public float getBearing() {
        return bearing;
    }

    public void setBearing(float bearing) {
        this.bearing = bearing;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public static MapLocationData transfer(AMapLocation location){
        MapLocationData mapLocationData = new MapLocationData();
        mapLocationData.setAddress(location.getAddress());
        mapLocationData.setBearing(location.getBearing());
        mapLocationData.setLongitude(location.getLongitude());
        mapLocationData.setLatitude(location.getLatitude());
        return mapLocationData;
    }

}
